# Contributor: Jakub Jirutka <jakub@jirutka.cz>
# Maintainer: Jakub Jirutka <jakub@jirutka.cz>
pkgname=lua-lut
_rockname=lut
pkgver=1.2.1
pkgrel=0
pkgdesc="Lubyk base module for Lua"
url="http://doc.lubyk.org/lut.html"
arch="noarch"
license="MIT"
depends="lua lua-lub"
provides=""
source="https://github.com/lubyk/$_rockname/archive/REL-$pkgver/$pkgname-$pkgver.tar.gz"
builddir="$srcdir/$_rockname-REL-$pkgver"

for _v in 5.1 5.2 5.3; do
	provides="$provides lua$_v-$_rockname=$pkgver-r$pkgrel"
done

package() {
	local rockdir="$pkgdir/usr/lib/luarocks/rocks-common/$_rockname/$pkgver-1"

	mkdir -p "$pkgdir"/usr/share/lua/common
	cp -r "$builddir"/lut "$pkgdir"/usr/share/lua/common/

	mkdir -p "$rockdir"
	echo 'rock_manifest = {}' > "$rockdir"/rock_manifest
}

sha512sums="594ab28778abf0ccf35859f082b0555a17c0c1265d0f2f097fad5dda012c8087b2175500896a0dfb82683e6dca6c6662ccf5badb9162423313e2b60b971c8212  lua-lut-1.2.1.tar.gz"
